package risk.client;

import risk.client.player.Computer;
import risk.client.player.Human;
import risk.client.player.Player;

import java.util.ArrayList;
import java.util.List;

import risk.client.GameGrid;


public class GameManager {
    List<Player> players = new ArrayList<Player>();
    
    /**
     * @author: Johan
     */

    
    public GameManager(GameGrid grid) {
        players.add((Player) new Human(grid));
        players.add((Player) new Computer(grid));
        //gameLoop();
        //Dice dice = new Dice();
    }
    
    private void gameLoop() {
        while(true) {
            while(players.size() > 1) {
                turnLoop();
            }
            
            // TODO: Winner Dialog
        }
    }
    
    private void turnLoop() {
        int index;
        for(index = 0; index < players.size(); index++) {
            //players.get(index).reinforce();
            //while()
                //players.get(i).getMove();
                //if(attack)
                    //create attackDialog(x, y)
                //if(fortify)
                    //players.get(index).fortify();
            //players.get(index).drawCard();
        }
    }
}
